"""
登录模块 接口对象层
"""
import requests
from common.get_day import getDate

class ihrmLoginApi(object):
    # 登录方法
    @classmethod
    def login(cls,json_date):
        url="https://ihrm-java.itheima.net/api/sys/login"
        header={"Content-Type":"application/json"}
        resp=requests.post(url=url,headers=header,json=json_date)
        return resp

if __name__ == '__main__':
    day=getDate()
    json_date={"mobile":"13800000002","password":"929itheima.CN032@."+day}
    resp=ihrmLoginApi.login(json_date)
    print(resp.json())
